<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../resources/css/bootstrap/bootstrap.min.css">
    <link rel="stylesheet" href="../../resources/css/style.css">
    <link href="../../resources/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link rel="stylesheet" href="../../resources/css/plugins/bootstrap-table/bootstrap-table.css"/>
    <link rel="stylesheet" href="../../resources/css/pluginsExt/common.css">
    <style>
        .fixed-table-toolbar{
            padding-left: 28px;
            padding-right: 5px;
        }
        .fixed-table-container {
            margin-left: 28px;
            margin-right: 5px;
        }
        .table > tbody > tr > td{
            line-height: 2.42857;
        }
    </style>
</head>
<body>
<div class="white-bg row-fluid">
    <div class="row wrapper wrapper-content animated fadeInRight">
        <div class="portlet box grey col-xs-12">
            <div class="portlet-body">
                <table id="fullTab">
                    <thead>
                    <!--表头设置-->
                    <tr>
                        <th data-field="Name"  data-editable="true" data-align="center">用户名</th>
                        <th data-field="Phone"  data-editable="true"  data-align="center">手机号码</th>
                        <th data-field="curPoi"  data-editable="true" data-align="center">当前积分</th>
                        <th data-field="calPoi"   data-editable="true"data-align="center">加/减分</th>
                        <th data-field="calAftPoi"  data-editable="true"data-align="center">加减后积分</th>
                        <th data-field="calCausePoi"  data-editable="true"data-align="center">加/减分原因</th>
                        <th data-field="operate"  data-editable="true" data-align="center" data-formatter="operateFormatter">操作</th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
</div>
</body>
<script src="../../resources/js/jquery-2.1.1.js"></script>
<script src="../../resources/js/bootstrap/bootstrap.min.js"></script>
<script src="../../resources/js/plugins/bootstrap-table/bootstrap-table.js"></script>
<script src="../../resources/js/plugins/bootstrap-table/bootstrap-table-zh-CN.js"></script>
<script src="rawgit.com/vitalets/x-editable/master/dist/bootstrap3-editable/js/bootstrap-editable.js"></script>
<script src="../../resources/js/plugins/bootstrap-table/"></script>
<script src="../../resources/js/pluginsExt/bootstrapTable/tableExt.js"></script>
<script src="../../resources/js/plugins/layer/layer.js"></script>
<script src="../../resources/js/pluginsExt/layer/layerExt.js"></script>
<script>
    /**
     * Created by zq on 2017/1/11.
     */
    function operateFormatter(value, row, index) {
        var json =jQuery.parseJSON(JSON.stringify(row));
        var factorId=json.id;
        return [
            '<a  class="edit btn btn-md btn-default" title="通过" style="background-color: #1369b8;color:#fff;margin-right: 10px"><i class="fa fa-check-square"></i> ',
            '通过',
            '</a>',
            '<a  class="edit btn btn-md btn-default" title="拒绝" style=""><i class="fa fa-minus-square" aria-hidden="true"></i> ',
            '拒绝',
            '</a>'
        ].join('');
    }
    $(function () {
        //定义table
        var data=[{
            Name:'骑猪闯天下',
            Phone:'18620906190',
            curPoi:'1000',
            calPoi:'+1000',
            calAftPoi:'2095',
            calCausePoi:'参加优茶线下活动'
        },{
            Name:'骑猪闯天下',
            Phone:'18620906190',
            curPoi:'1000',
            calPoi:'+1000',
            calAftPoi:'2095',
            calCausePoi:'参加优茶线下活动'
        },{
            Name:'骑猪闯天下',
            Phone:'18620906190',
            curPoi:'1000',
            calPoi:'+1000',
            calAftPoi:'2095',
            calCausePoi:'参加优茶线下活动'
        },{
            Name:'骑猪闯天下',
            Phone:'18620906190',
            curPoi:'1000',
            calPoi:'+1000',
            calAftPoi:'2095',
            calCausePoi:'参加优茶线下活动'
        },{
            Name:'骑猪闯天下',
            Phone:'18620906190',
            curPoi:'1000',
            calPoi:'+1000',
            calAftPoi:'2095',
            calCausePoi:'参加优茶线下活动'
        },{
            Name:'骑猪闯天下',
            Phone:'18620906190',
            curPoi:'1000',
            calPoi:'+1000',
            calAftPoi:'2095',
            calCausePoi:'参加优茶线下活动'
        }]
        var fulltab=$('#fullTab');
        //初始化通用table,传入第一个参数table对象，第二个参数请求后台的url;
        initTable({
            obj:fulltab,
            data:data,
            showsearchBtn:true,
            search:true
        });

        $('#searchBtn').on('click',function(){
            fulltab.bootstrapTable('refresh');
        })
        //添加按钮事件
        $('.btdAdd').on('click',function(){

        })
        $('#Audit').on('click',function(){
            addLayerIframe({
                //url:'newModule/userIntegral/integralAudit.html',
                title:'积分详情'
            })
        })
    });

</script>
</html>